<?php
// define array
$data = array(
    'username' => 'john',
    'password' => 'secret',
    'host' => '192.168.0.1',
    'php'=>array(
          'framework'=>array('zend','cake'),
          'cms'=>array('wordpress','joomla')
    ),
    'version'=>5,
    'price'=>500.45,
    'isValid'=>false
);
//echo json_encode($data);
//echo serialize($data);

/*
{
  "username":"john",
  "password":"secret",
  "host":"192.168.0.1",
  "php":{
        "framework":["zend","cake"],
        "cms":["wordpress","joomla"]
        },
  "version":5,
  "price":500.45,
  "isValid":false
}
*/
$var = serialize($data);

print_r(unserialize($var))
